<table class="table table-striped">
    <caption>По месяцам:</caption>
    <tbody>
        <tr>
            <td><?=Application_Model_ProfitMapper::$stats[Application_Model_ProfitMapper::STATS_MONTH_CURRENT]?></td>
            <td><?=$this->statsProfit[Application_Model_ProfitMapper::STATS_MONTH_CURRENT]?> р.</td>
        </tr>
        <tr>
            <td><?=Application_Model_ProfitMapper::$stats[Application_Model_ProfitMapper::STATS_MONTH_PREVIOUS]?></td>
            <td><?=$this->statsProfit[Application_Model_ProfitMapper::STATS_MONTH_PREVIOUS]?> р.</td>
        </tr>
    </tbody>
    <tr class="info">
        <td><?=Application_Model_ProfitMapper::$stats[Application_Model_ProfitMapper::STATS_MONTH_BEST]?></td>
        <td><?=$this->statsProfit[Application_Model_ProfitMapper::STATS_MONTH_BEST]['summ'] ?> р. (<?=$this->statsProfit[Application_Model_ProfitMapper::STATS_MONTH_BEST]['month'] . '.' . $this->statsProfit[Application_Model_ProfitMapper::STATS_MONTH_BEST]['year']?>)</td>
    </tr>
</table>
<table class="table table-striped">
    <caption>По годам:</caption>
    <tbody>
        <tr>
            <td><?=Application_Model_ProfitMapper::$stats[Application_Model_ProfitMapper::STATS_YEAR_CURRENT]?></td>
            <td><?=$this->statsProfit[Application_Model_ProfitMapper::STATS_YEAR_CURRENT]?> р.</td>
        </tr>
        <tr>
            <td><?=Application_Model_ProfitMapper::$stats[Application_Model_ProfitMapper::STATS_YEAR_PREVIOUS]?></td>
            <td><?=$this->statsProfit[Application_Model_ProfitMapper::STATS_YEAR_PREVIOUS]?> р.</td>
        </tr>
    </tbody>
    <tr class="info">
        <td><?= Application_Model_ProfitMapper::$stats[Application_Model_ProfitMapper::STATS_YEAR_BEST]?></td>
        <td><?= $this->statsProfit[Application_Model_ProfitMapper::STATS_YEAR_BEST]['summ'] ?> р.(<?=$this->statsProfit[Application_Model_ProfitMapper::STATS_YEAR_BEST]['year']?>)</td>
    </tr>
</table>
<? if ($this->planeProfit):?>
    <p>План на этот год: <?=$this->planeProfit ?> р.</p>
    <p>Осталось: <?= $this->planeProfit - $this->statsProfit[Application_Model_ProfitMapper::STATS_YEAR_CURRENT] ?> р.</p>
<?endif?>

<div id="debts-buttons" class="btn-group">
    <button id="show-my-debts" onclick="money.showDebts(<?=Application_Model_Debt::TYPE_I_HAVE_TO ?>, this)" class="btn btn-small btn-danger">Мои долги:  <?= $this->debtsSum[Application_Model_Debt::TYPE_I_HAVE_TO] ?> р</button>
    <button id="show-me-debts" onclick="money.showDebts(<?=Application_Model_Debt::TYPE_MY_HAVE_TO ?>, this)" class="btn btn-small btn-info" >Мне должны: <?= $this->debtsSum[Application_Model_Debt::TYPE_MY_HAVE_TO] ?> р</button>
</div>